﻿using System.Collections.Generic;
using System.Windows;

namespace kursovaya.Windows
{
    public partial class MainWindow : Window
    {

        public MainWindow()
        {
            InitializeComponent();
        }

        private void MenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new AccountingWindow());
        }

        private void AddMenuItemInv_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new AddInvWindow());
        }

        private void SearchRemoveMenuItemInv_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new SearchRemoveInvWindow());
        }

        private void EditMenuItemInv_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new EditInvWindow());
        }

        private void AddMenuItemTec_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new AddTecWindow());
        }

        private void SearchRemoveMenuItemTec_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new SearchRemoveTecWindow());
        }

        private void EditMenuItemTec_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new EdtiTecWindow());
        }

        private void Exit_OnClick(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void About_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new AboutWindow());
        }

        private void Ander_OnClick(object sender, RoutedEventArgs e)
        {
            OpenWindow(new AnderWindow());
        }

        private void OpenWindow(Window window)
        {
            ContentContainer.Content = window.Content;
        }
    }
}